﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NewstorePlateformeDAO
{
    public partial class Marchandise
    {
        public static bool Insert(int utilisId, int? activiteId, Marchandise marchandise)
        {
            bool created = false;

            using (Newstore_PL_GOLD_BDDEntities context = new Newstore_PL_GOLD_BDDEntities(EntitiesHelper.connexionString))
            {
                created = marchandise.Add(context) > 0 ? true : false;
                if (activiteId != null)
                {
                    //TODO créer un enregistrement d'activité utilisateur
                }
            }

            return created;
        }
    }
}
